<template>

    <div class="box">
        <div class="top">
            <van-search v-model="value" show-action label="" placeholder="请输入您想要的商品" @search="onSearch">
                <template #action>
                    <div @click="onClickButton">搜索</div>
                </template>
            </van-search>
        </div>
        <div class="center">
            <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg">
                <template #tags>
                   <a href="/detail"><van-button size="mini">详情</van-button></a> 
                </template>
            
            </van-card>
            <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg">
                <template #tags>
                   <a href="/detail"><van-button size="mini">详情</van-button></a> 
                </template>
            
            </van-card>
            <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg">
                <template #tags>
                   <a href="/detail"><van-button size="mini">详情</van-button></a> 
                </template>
            
            </van-card>
            <van-card num="2" price="2.00" desc="描述信息" title="商品标题"
                thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg">
                <template #tags>
                   <a href="/detail"><van-button size="mini">详情</van-button></a> 
                </template>
            
            </van-card>
        </div>
    </div>
</template>
<script setup>

const detail=()=>{
    // location.href('/detail')
    $router.push('/detail')
}
</script>